﻿using System.Globalization;
using System.Windows.Data;

namespace Xioa_UI.Convert;

public class ToConConverter : IValueConverter
{
    public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
    {
        return value is null ? default(double) : double.Parse(value.ToString());
    }

    public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
    {
        return value.ToString();
    }
}